package game.player;

public class Player {

	private static Player instance = new Player();

	private int cash, lives, level;
	private String name;

	private Player() {
		cash = 1000;
		lives = 20000;
		level = 0;
	}

	public void reset() {
		instance = new Player();
	}

	public static Player getInstance() {
		return instance;
	}

	public void addCash(int money) {
		this.cash += money;
	}

	public boolean canPay(int money) {
		return this.cash >= money;
	}

	public void substractCash(int money) {
		this.cash -= money;
	}

	public void looseLive() {
		lives -= 1;
	}

	public void gainLive() {
		lives += 1;
	}

	public int getLives() {
		return this.lives;
	}

	public void increaseLevel() {
		this.level++;
	}

	public int getCash() {
		return this.cash;
	}

	public int getLevel() {
		return this.level;
	}

}
